package com.leo.foodmaster.ureport2.controller;

import com.leo.foodmaster.admin.system.entity.SysUser;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * ureport测试Controller
 * </p>
 *
 * @author ：Leo
 * @since ：2021/9/28 14:33
 */
@Component
public class TestController {

    public List<SysUser> loadData(String dsName, String datasetName, Map<String,Object> parameters){
        List<SysUser> users = new ArrayList<>();
        int i = 100;
        for (int i1 = 0; i1 < i; i1++) {
            SysUser sysUser = new SysUser();
            sysUser.setName("test" + i1);
            sysUser.setAccount("account" + i1);
            if (i1 % 2 == 0) {
                sysUser.setSex("1");
            }else {
                sysUser.setSex("2");
            }
            users.add(sysUser);
        }
        return users;
    }
}
